﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ASPNET.StarterKit.BusinessLogicLayer;
using ASPNET.StarterKit.DataAccessLayer;

public partial class InventoryTracker_UOM : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnUOMSubmit_Click(object sender, EventArgs e)
    {
        DataAccess DA = DataAccessHelper.GetDataAccess();
        UOM aUOM=new UOM(txtuom.Text);
        try
        {
            if (DA.CreateNewUOM(aUOM))
            {
                lblResult.Text = "SUCCESS";
            }
            else
            {
                lblResult.Text = "FAILURE";
            }
        }
        catch (Exception ex)
        {
            lblResult.Text = ex.Message.ToString();
        }
    }
}
